/**
 * Copyright (c) 快宝网络 kuaidihelp.com Co., Ltd. All Rights Reserved 禁止外泄以及用于其它的商业用途
 */

import React from 'react';
import { Redirect, useLocation } from 'umi';

const hashPathMap = {
  other: '/',
  feedback: '/f/feedback/kdyHandle',
};

const Transfer: React.FC = () => {
  const location = useLocation();
  const { hash } = location;
  const to = hashPathMap[hash.replace('#/', '')] || hashPathMap.other;

  return <Redirect to={to} />;
};

export default Transfer;
